/**
 * Jason M. Burton
 * July 2012
 * This method class was created
 * to provide the parsing algorithm an
 * object to store the various method parameters
 * and types
 * Version .3
 * Modded by Shane Burroughs
 */

package umlteam.src.main.java.edu.umuc.duchon.umlteam.main.parsers;

public class Method {
	String methodReturnType;
	String methodName;
	String methodVariableType;
	String methodVariableName;
	/* methodVariableList will contain both the method variables and their types */
	java.util.ArrayList<String> methodVariableList = new java.util.ArrayList<String>();

	/* Generic Constructor */
	public Method() {

	}

	public void setMethodReturnType(String methodReturnType) {
		this.methodReturnType = methodReturnType;
	}

	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}

	public void addMethodVariable(String methodVariableType) {
		methodVariableList.add(methodVariableType);

	}

	public void printMethod() {
		System.out.println(methodName + "(");
		for (int i = 0; i < methodVariableList.size(); i++) {
			System.out.println(methodVariableList.get(i));
		}
		// System.out.println(")" + methodReturnType);
	}

	public String toString() {
		return methodReturnType + " " + methodName + "\n";
	}
}// end Method Clas
